added flexible counting of error modes using mongodb
rm folder