Remove use of error package, buffer io.