Cleaned up the log file, and fixed the bug in which always printed out network messages failed