Added auto-creation of files
Several enhancements