You may want to put these pieces into a try block, and have the except clause print an error, stating what needs changes, and quit.