added log functions and increased stability with error handling in systemstatus and daemon