Set mode variable correctly, suppress unwanted debug output. Reviewed-by: hjk <qtc-committer@nokia.com>