Replacing calls to `Exception#printStackTrace()` with Java logging.

This will keep output cleaner, especially in Android where logging and stdout are mixed.