writing programmer to file correctly