Added write_file test