picky: lockPath should really be const StringBuffer & (or const char *)