Use EXTERNAL_FILE_SUBPATH_PATTERN env var instead of initializer

Closes #1153