Correct file and arguments handling