Make sure to reset internal state when filesystem is mounted externally. Remove beforeUnmount which by definition cannot be made to work with this.