added exit command
added check for interactive before processing 'exit'