fixed NPE on ec2 log statement