compiler entry point can now take write and error callbacks