Improve datapack error detection