Clean up buffer + GPG error handling