Add hook to delete profile directory if not required