refactor loadAsFile to use an array of extensions
add ability to require other file extensions

keeps js an json as defaults