fixed minor bugs and now application will have a exit status of 1 with failed