add comment about why we undo prelinking
improve error message
only undo prelinking if it was done before