fix file parsing