hotfix replace to replaceAll
added exception handling to server so that it won't restart