please move `serverListen(server.on("error", serverListen.error));` after the `if/else`