wrapped all JavaScript into try/catch