allow for failure of encode(2) functions as per the man page