[Core] Only substitute variable if a configuration file is provided

Linked with #36