cleanup printf strings and errno handling
9 files changed