Cleanup logging/stdout/stderr.