remove debug output and add status dumps for errors