Fixing logging and QUIT command. Hah!