Added ability to cancel from progress dialog.