adding in error msg handling for non-xml files