@ahirreddy This logic replaces the monitor thread. Please take a look.