maybe split File open with lock as a different class.