A Simple function that write value in a file