renamed $log_dir into $dir in logger