replace line breaks after error check so line numbers are accurate