Resolve path to the base directory automatically