Server improvement

Added logging, configuration files, error handling