fix AddCommand for pid file