added doesFileExist method