block while waiting for write access to file