make core_pattern and core_directory configuable