This is the wrong place for this check, this method should not be called
if no files are passed.