Add some code for writing to the shell