Checking files with stat