introduce get_file_type to get easily the type of file (image, multimage, civdata...) a few bugs corrected in series