added badge rule
fix file persistence