error handling, packaging, socket bugfix