fix debug output on UPDATE
change debug output to stderr