fixed bug with spaces in filenames