#4 addl logging and null checks