write both found and used TERM type to debug log