Basically we need to open the file just once and then keep appending
Basically we need to open the file just once and then keep appending