modify serial device settings instead of using empty template; check if serial fd is a valid terminal