fix build writing