Added printf
Merge branch '0.5.0' into 0.5.1
Bug fixes for windows build