Changed open file to be compatible witt 2.4