Cleanup and properly stop if require is not available.