Refactored logging. Increased default log buffer size.