pub fn detect_file_format(path: &Path) -> Result<FileFormat, Box<dyn Error>>
Detect file format based on extension and content analysis