File type recognition