Move file parameter preparation into new method, to reduce complexity