Fix FunctionalSpecification cleanup

Ensure we block to remove race condition and handle 'ns not found' errors