Finish error wrapper, socket write wrapper