Added poll timeout to kill the process if no activity detected per timeout