Fix "Variable access via 'log_dir' is deprecated" warnings