Extract file_present? logic in a method