remove unnecessary code
Move log dir inside home_dir and only use if in debug mode