I think this condition should be the other way around.

It currently read "if I can't read the PID file or the PID is NOT empty, then...", but it should be "if I can't read the PID file or the PID file IS empty"...