fix file read/write issues with meritBadges