added datatypes configuration
check datatypes and modify query accordingly
reduced logging