fixed using a directory path as basePath instead of a file path