Further optimize getting list of units to process

Signed-off-by: Michal Čihař <michal@cihar.com>
Correctly use stderr instead of printing

Signed-off-by: Michal Čihař <michal@cihar.com>