Put fs.stat in a new method called checkFileSize