improved logger and fix image file path