fixed bug when input file contains space

@amrrady