Looks okay. As a general principle though, I really prefer to see file/directory creation tried blindly and any EEXIST error caught, since that way if e.g. two instances are started around the same time one of them won't blow up due to a race between the existence test and creation.
Looks okay. As a general principle though, I really prefer to see file/directory creation tried blindly and any EEXIST error caught, since that way if e.g. two instances are started around the same time one of them won't blow up due to a race between the existence test and creation.