Remove the redundant function 'writeFileWithCheck'