added logfile level determination