added monitor to a file (not complete)