Fixed issue where locked files could not be read