Fixed log level overwritting if debug setting is true