Free alloc and Write to file works! now programming read from file