TRACE: use DxfFile struct.

Signed-off-by: bert <bert.timmerman@xs4all.nl>
TRACE: check for NULL pointers and do basic checks.

Signed-off-by: bert <bert.timmerman@xs4all.nl>