$filesize = -s $filespec; die "error: $!" unless defined $filesize;