Added error handling (100% coverage, 100% compliance)