moved log creation