added option to specify schema directory