Revert "move warning to the top"

This reverts commit 565cf849d1ff00a42bf2d09299585ff8ba247b60.