Added function to write blob objects by file or string