Added hook to thin:restart