Add return value to `printTargets` method