fixed bug in log/dir