added base_dir to main app