If you have an EZPlug with an EZPi running off of it you will want to let the Pi shut down before the plug turns off. This tip comes from Ulderico Cirello who is an awesome customer of ours and community member.
You'll want to setup the plug similar to the below screenshot. Notably these 2 changes:
Once you set these options the plug will shut off after 60 seconds and send a shutdown command to the Pi after 5 seconds. Once these 2 things run the Pi will safely shut down and then the plug will turn off.