Changes to get working on amazon ec2 and fixed erronious println to tcpWrite