Added write_to_file lines.

Added write_to_file lines.