Added some monitoring logic.