Handle an unlikely fopen failure in compose_write_to_file()