improved handeling of stdout/stderr output and general logging for a daemon usage