cleanup printf strings and errno handling
7 files changed