exception handling and more metrics