Adding Better Exception Handling