format codes, rewrite function extensionFromFilename