fix for working with db.createWriteStream
fix for db.createReadStream