Minor fixes, sent all debug "echo" to /dev/tty to differentiate return values from user messages