add preview mode; use logger;