Added support to take file input and outputs to temp file