Update mode class only if filename was changed. Closes #114.
fix test.