How to make the most of a failed experiment