use raw_fd_ostream instead of fstream with graphwriter,