v0.2.2
stop crashing on first-appearance of file

also some refactoring