will rename it to error, but 0 means 0 bytes, isn't -1 more appropriate?