Dynamically create directories and subdirectories on file_save. Added subdirectory creation to mkdir() for file_copy.