Declared write_grid_to_file()
Defined write_grid_to_file()
Get grid width, height and output filename from arguments