Open file refactored, convert method added