added type-check function, cleaned up SASL log entries