Revision 6

Improved error handling - Added error message