add missing #include
fix messed up flag name
update how log levels are passed
update flags