Change error handling to properly populate string from printf parameters