Fixed error reporting
Added changes