Use progressBar in beginReq endReq functions and delete the not needed code