Implemented managing a lock file with the PID value