added detailed debug output