Reads correct file extension.