CB-6481 Replaced CordovaError throwings with Error per @kamrik review
Extracted prepareOptions Hooker method