close file on REPL exit
rebuild