added line to write edited task into file