fix: missing empty bytes in zbf
fix unbound local variable
meet format of zemax manual
fix writeBeamFile
fix writeBeamFile