fixed ifexists transactions
added some error handling, handle client endpoint not available