Removing some debugging code that was accidentally committed
Add function for writing out to a log file

This is currently performed automatically when calling
Debug::End() if any logging is turned on.