Function to run hooks
RUN is dead
Initial plugin API, run_cmd added