Additional tests
Additional logging
Fix to prepare statement for compatibility with runtime-pig