Added error checking in case program is run without file parameter.