safe_write_forever