fixed setup bug and moved log to util