support overriding the type on createWriteStream()