Added possibility to define a pre_start_hook