fixing setloglevel when logfile not initialized