added loging, fixed handling errors, progress bars improvements