Fixed the empyty file image creation code.