Clean up capture script