Using `fs.exists` is usually a bad idea because of race conditions. It might be fine in this case, but it's better to let `chmod` fail and handle the error instead.

Using `fs.existsSync` is always a bad idea.