Add percentage complete code and upate the progress bar