use new wrapper write_file() for simple file writing