trying to get better error reporting
add more logging