Added multi-core support and error-handling on server side