replaced print output by logging method
reverted time initialization on None
removed exception wrapping for better debugging