Add additional error logging, support configurable schemes (#69)