Thannnnnnnnnnnnnnx nelo very much you are right
at the beginging code for serialization i un-register the error handler fn and after closing the file i re-register it once again and it work.
thanks