added some error logging to help debug issue on dev