Removed debug echo
Improved exception class