add autoopening of files