Added input checks to main file