Added useful log and error messages