Add before_exec to resource def