Added some failsafes/warnings.