made the file write function a bit more flexible
almost rendering fixed size objects