fixed compile problem when cuda not configured in
removed debug printfs
Small cleanup to error output. Also fixes two small bugs.