putFile should take an optional headers argument