Open and close with synchronization and error handling finished.