adding more debug information to serialize