fixed last example to handle filenames with spaces