Support opening locked files as readonly