slight tweak to avoid instantiating File objects we don't need