updated write_to_file.c to include procedure example