add exception handling for monitor