Fix #2 the application exits in case of error