Scala code for a recording actor (not fully working yet)