change startscript to daemon and nohup, refactore tweet and add logging