Add a readln to lock the console when application exit in error