change to log level and fix a bug