added more Log calls for debugging