Bugfix: use of logfilename
bugfix: catch IndexError, too.