Trim line length in error generator