major changes including output path and port fixes