error message and comment sorting