Clean up last function a bit and close file :)