Added pre/post stages handling