change sscanf to strtol for getting fd