Added support for subdirectory