Use cxxstdio
Add warning newlines; fix crash on exit.