recover from failures in golang