refactoring log functions and use just one for warnings

Signed-off-by: Thiago Rondon <thiago.rondon@gmail.com>
write default config if $ETC not exist and the user not filled all the options

Signed-off-by: Thiago Rondon <thiago.rondon@gmail.com>