fixing up pidfile stuff