Added support for running in subdirectory