add runtime error monitor