Added retries to all idempotent APIs. Added logging. Some more fixes