fixed bug about log filenames.