Fix to handle file names containing spaces