Refactor MainActivity and implement Choose File dialog window