added movie encoder error checking