compile: test for valid filename