removed C++11 to_string in favor of boost::lexical_cast
fixed and tested error handling and messages in functions to match doc in manual