Fixing file ordering problem with graphics