Enable debug option from config
Remove unused codes