Added operation logging, PID checking and email notification