move more logpy code into try block