Reimplementing catch
Catch is working for inner upload loop.