add preview method to File object