Update app.js

Allow streaming and saving of file