CHG: Improved detection if the file exists