Re-implemented file name parsing with strchr