Added some Exception Handling