Added error handling for memchace POST data