Fix bug: The pid file was the PID of tee