bugs in Factory and EdfWriter was fixed