added try/catch in wamp