Added check for file existing before trying to unlink it