remove writing out body, write out file extension