Execute terminate funcion on stop request
Add missing files for Encoder block