Simple utility to write value to file.