Adapted to handle unformatted files