Add backwards compatibility to file handling