Auto open main file