writing flood data to file