Berne man accidentally shoots himself