I wrote a code to delete a line from a file and for some reason the deletion deletes all the content from the file and I can not figure out what is wrong with my code ... If