Add support for writing files