remove require false
better error handling when converting encoding