Added logging to help find error.