Changed defining of base_dir