fixed bugs in file constraints