Add check for file_exists