Changed to use new writeFileInput method of angular-filesystem service