Checking the size now before the tempfile is written.