add logginf for failure