Added stop-hook automatic setup