add includes and fix some logs