Open log files with a+ mode; check that the path doesn\'t exist before creating it