implemented stdout monitor