update getFile with more consistent function