UPDATE: allow the optionalPath to be configurable.