log instead of printing to stdout