improves recursive file getting functions