Add directory parameter to constructor
Change error format to a standard format
Add loop to append directories to filenames