Added a new write integer function.