Removed branch check as it is now done in main()
Changed file modes