updated error msg in try/catch