Adding mode method to file_objects