updated to enable filename as startup parameter