custom_directory is static now. It should not be part of the public API