added status thread and controlling of the progress bar