adding logs for errors