added check for existance of input file earlier