fixed logging and added commands to change message levels