Fixed PID_SEARCH and remove stale pid file