Fixing a bug in the file existence check.