fix DBOpen bug
if write db obj failed, write invalid value instead