Fixed Windows build, added stats printout