Added fileSystem handling for Cordova