formatting of errors and preview table