Move to using std::error