ON/OFF shim not working

I am new to Raspberry Pi so please excuse my ignorance. :)

I have a Pi3 B+ to control my 3D printer, using Octoprint and that seems to be working OK.
I have added the ON/OFF Shim to switch the Pi off safely but it doesn’t seem to do anything. I don’t know if the software has installed properly but this is a screenshot of my terminal window when I upload it. The “unknown command” makes me think it hasn’t accepted it. I’ve done it several times with the same result each time. When I press the the button on the shim, the red light by the button comes on until I let go.

Can anyone help please?