added more debug output. Now error message and line number are shown.