v1.7 - Better logging and additional error checking