improved shutdown-process & fix application crashes on minor errors

Signed-off-by: Andrwe Lord Weber <github@andrwe.org>