fixed error and added some progress info