ERMIN-5644
* Add error handling and improvements