first excercise
ex2, bug catching
changed bugs
modified copy and added writeall
readall function + cat function (like unix cat)