Converted to sync approach and strenghened exception handling