Use fs.existsSync and fixed mixed indentation