error reporting p2

*completed basic error reporting system
*fixed #7