fix/cleanup printf strings and errno handling
3 files changed