make logger flexible and user-friendly
use logger for output