debug on stdout and handling of empty needle