preflight and check the error before attempting to load