don't fail if pid file does not exists, refactoring