fixing bug and reducing loglevel when in test mode