fixed two space indentation & added bin.mkpath instead of mkdir