Add some error checking/logging