Writing to file and reading from input stream is added.