Fixed bug with IndexedDB not returning null for the error on writeFile.