Remove error check for encoding because it serves no real purpose.