add catch for syntax error