Added error logging
Improved start-script
Fixed bugs