file input and output in a very simple way