Logging fixed(too many useless logs before)