Added recording mode to help with testing