debugPrint could accept an optional injected logging method. This should be off/null by default but would give the user the option to log errors and exceptions for debugging purposes.