Open file discarding bug fixed