now using error log to store errors.