Add before hooks