Fix logging and log levels