Change the way of adding :xlsx to formats. Add debugging output