Added code to record input to console