Fix: wrong parameter order and close file