adds pretty print dependant on file type