Fixed errors for files with names containing special characters