Adds new getAsFile method to implement export API