Fix exceoption catching
Only log in file in startLog() in not called
Configure a debug level to store in database + don't store empty script log