added more logging and better networking capabilities