remove rescue block and added logging statements