Added saving of captured gestures to file