Adding good exception
Adding better error handling