when running a os command it throws illegal monitored state exception every time on p.wait(). I tried to use a syncraized block on p but, then it sits there forever if you u