Fixed file output, made arguments more sensible