added -k option for non-stop monitoring