Add debug information to check for corruption