Fixed the subimage naming issue. Reworked the logging sections and added more logging statements.