remove line
update to handle exception in syntaxError
improve error handling