Added logging and retry-on-error strategy