Removed exit() calls in extract so that it can be used within plugins from the manager