log dir and master's port as parameters
renamed variable