fixed bug involving file names with spaces