Go back to using cstdio rather than iostream.
Fix string parsing bug.