adding console logs in each catch bock describing where the error occured and what the error is