Phew! Turns out it was a bad earth which was causing intermittent failure of the fan with the wiring worn. Now replaced and working.