Added support for BeforeStep hooks