abort button added, show progress bar only if thread is running