Moths fly to light bulbs as they have not yet evolved enough and believe it is the moon - as moths all head towards the moon to mate, as they will obviously bump into other moths.
The saying close but no cigar comes from old fruit machines, where if you won well you won a cigar.