Module now throws exceptions rather than echoing message and then calling die()