using logstreambuf::eof instead of traits_type::eof()
added missing header files
code cleanup
updating doxygen comments