It looks like no $mode or an invalid $mode variable was passed to the script.$mode = .