moved log creation logic to app