Wrote error method
Changed error method