added int range bounds check to file selection menu (this commit
shouldn't be in this branch but whatever)