Enhancement: Added logging exception trap