I have left some error messages. They were not needed. Please remove lines start with std::cerr .