Fix race condition on error fetching

Sometimes the appropriate buffer was determined using the
minibuffer as the filename, which resulted an error. This
guards the overlay printing

The communication should include which filename the errors
are for to avoid this kind of issue in the future.