added form/multipart encoding and reformatted output txt file