Moved network messages to bottom of script