improve logging to always show task for connection
ensure that max_in_flight is never < num_tasks