Added ability to cancel progress dialog.