Added preflight + credit to @paulwithap