add logging option
set correct datatype