Stringify elements explicitly and add Logging

Add debug logging around allocatabililty checks and force string comparisons.