Basic input file check added
Added -o option for output file.