make sure to write pid to PID_PATH