write history for quickly restarting processes