added api for openWrite without dart:io