rewrite error handling to make sense
1 file changed