added dynamic port settings and better launch logging