put pid in pids directory