If you’ve ever connected an external disk to your Mac only to be troubled by a “Disk Not Ejected Properly” warning message as soon as it wakes up from sleep, then this app is for you.

Forgetting to eject your mounted disks before your computer goes to sleep is not only annoying but can also lead to unwanted data loss. You can eject a CD or DVD from the desktop by dragging the volume icon to the Trash or right-clicking it and choosing the Eject command from the popup menu. You can also unmount an external disk from a Finder window’s sidebar.

With Ejectify for macOS, this becomes one less thing to worry about.

This macOS menu bar app automatically unmounts any external disks connected to your when as soon as the computer starts sleeping. On top of that, the software will automatically mount the unmounted disks again after your Mac wakes up. “It becomes handy when you have connected a USB drive to an external display that gets powered off when your Mac starts sleeping, causing the drive to be ejected forcefully,” said Ejectify developer Niels Mouthaan.

You can configure which external disks and volumes should be unmounted automatically and when. As for the “when”, your available choices include “When the screensaver starts”, “When the screen is locked”, “When the screens started sleeping” and “When the system starts sleeping”, giving you the flexibility to customize the app to your liking.

You can download Ejectify from the official website for free by entering discount code op6xa4g (regularly $3). The software requires the macOS Sierra 10.12 update or later. The app is also free when built from the source code, which can be found on GitHub.