writing correction in a binary file