Fixed another file locking issue