better error message if encoder can't initialize