Write data to local file in cat_file.cc