Used new type of enum for the exit status type
Added output file functionality