Fix code style and add logging module loading