simplified code
small fix
readded exec output to log