Variable file dumping snippet

Added snippet to dump a variable to a file.