Add clean up to the input and output session
Merge pull request #9 from reymundolopez/master

Add clean up to the input and output session