Logs: Performance improvements and bug fixes