Improved error message when id not found
Improved testing for idnot found and testing cleanup