Added writing to disk