added check for filenames with spaces
file names with spaces