fix error in existsFile