Added support for pausing recording

It supports pausing while recording