added the persistency part (buggy)
file writings fixed but not thread-safe
mts segmentations faults
fixed bugs
FINAL
Fixed writing at the correct position in the file