Shouldn't be the if clause
if header :contains "X-Spam-Level" ["*****"]
Dunno if the square brackets are playing the game, but worth to try it.
Another advice that might help is to check/edit your require line. I'm using
require ["fileinto","regex","envelope","vacation"];
for some if header...