change logging to log and add support for verbose output