class dir bugfix related to include/exclude patterns, upload image improvement