exception handling in the case that the user runs the server twice.