added checking for base_port
renamed output directory