proper formatting of error messages