cleanup file_type loop