- use std::fstream instead of boost::iostreams for properly working flush - removed some catch-all blocks - reduce catch scope of some try/catch blocks to clearly indicate intent