Ah yeah it should be file since filename is defined only if file is not empty/nil.