was reading tempfile incorrectly resulting in a 0byte file being stored in azure