fixes #4, warn on unsaved changes