Use log or warnings.warn instead of print

This addresses issue #1065