using boost::filesystem and some fix