move global fileformat handling to own file