raw file validation and conversion