refactoring: extracted line prefix when printing error report