I found that caffe::WriteProtoToTextFile(const Message& proto, const char* filename) does not write anything if filename does not indicate an existing file, due to use of open(2) with O_WRONLY at https://github.com/BVLC/caffe/blob/master/src/caffe/util/io.cpp#L46. I think this behavior is unintuitive (and also inconsistent with its binary version). Is it intended? If not, I want to fix it.