Defines a function to call as sbt exits.
Subclasses should implement this method, which is called when this hook is executed.