Why are you using file() rather than open()?