Code reformatting - part 1

Move exit() outside of error_message()