Initialise all security-related functionality, then perform the given action. Abort with an error message if security-related functionality cannot be initialised. This will also indicate failure to the shell, as with die.
Use
main :: IO ()
main = secureMain doTheThingIActuallyWant