Test file formatting and FormatErrorMessage test