cleanup get_file_type()