Fixed if-else statements and docs in action hook scripts