add check if logs is already there
add check for broken logs
add some doc strings