Know when to cut your losses and move on.