changed linebreaks to std::endl
host is flushed before destroyed