Capture script for saving files locally with sequential numbers