Fixed parsing of bad file names