Added custom logging, debugging and additional settings