Added functionality to close option from file menu