Add function to register std exit signals