correct the open flags in overwrite_file
make error_or compile with GCC again