changed throws to std::cerr