beginning transmission output moved to preceding thread to ensure it is printed before waiting ouput