everything works again with better file parsing