store log on process exit