Corrections to inptu reader, use of std::cerr instead of std::cout