Minor tweaks on the get files function