Adding .e, .w and .i to log err, warn and info
Reformatting code