Better cleanup of pid lock file in service