support passing both pathOnly and file to serveFlavor