Rewrite Code, Add LogSystem

Rewrite the Code of Engine Mode and Add Log System