Improved stash error logging