better detection of available fields; better storage file names