Completed bildFile function, not yet tested