instead of locking file strdup filename