Don't override important environment variables

Signed-off-by: Simon Busch <morphis@gravedo.de>
Rename variable to match it's content correctly

Signed-off-by: Simon Busch <morphis@gravedo.de>
Fail to start when we can not initialize the application

Signed-off-by: Simon Busch <morphis@gravedo.de>
Close file when we're done with it and cleanup logging

Signed-off-by: Simon Busch <morphis@gravedo.de>
Merge pull request #3 from webOS-ports/morphis/work

Morphis/work