defensive programming for spaces in a file name