I have the feeling that "filename" isn't quite the right variable name here, is it?