error handing + manual xml serialization fixes