fixed pids options.  added logs (dir) option.  added isMaster function.