--logs option added, bugfixes